﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CRM
{
    /// <summary>
    /// Summary description for Handler1
    /// </summary>
    public class Handler1 : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Write("Hello World");

            if (context.Request.Files.Count>=1&&context.Request.Files[0]!=null)
            {
            
                    context.Request.Files[0].SaveAs(context.Server.MapPath("~/upload")+"/"+context.Request.Files[0].FileName);
                
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}